<?php

if (!defined('TOBBIVM'))
	header('location:/template/notrepassing.php');
/**
 * This file is part of TobbiVMShop.
 *
 * TobbiVMShop is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TobbiVMShop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TobbiVMShop.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * create the output for the static-pages
 * get: page/tpl.php
 * used from core.php
 *
 * @version    $Id$
 * @package    TobbiVM-Shop
 * @copyright  Copyright (C) 2012
 * @author     Norbert Gebert
 * @license    GPL3
 */
function contentPage($refPage, $page, $title, $name, $refValidate)
{
	$refPage->assign('Metakeywords', META_KEYWORDS);
	$refPage->assign('Metadescription', META_DESCRIPTION);
	db::getInstance()->where("page_name", $title);
	$result = db::getInstance()->getOne("page");

	$pageText = $result['page_text'];
	$pageText = xplugin::getPluginCode($pageText);

	$refPage->assign('header', $result['page_header']);
	$refPage->assign('text', $pageText);
	$refPage->addtpl('content', '/page/page.tpl.php');
}

?>